# -*- coding:utf-8 -*-

from sqlalchemy import Column, ForeignKey, Integer, String, DateTime, Text
from config.database import BaseMixin, Base

class BgFile(Base, BaseMixin):
    """
    素材文件表
    """
    __tablename__ = "bg_file"

    category_id = Column(Integer, nullable=False, comment='文件分类')
    cover = Column(String(255), comment='封面')
    detail = Column(Text, nullable=False, comment='详情')
    file_size = Column(String(20), nullable=False, comment='文件大小')
    mark = Column(String(255), comment='描述标记')
    name = Column(String(255), nullable=False, comment='文件名称')
    video = Column(String(255), comment='视频')
    file_url = Column(String(500), comment='文件URL')
    file_type = Column(String(50), comment='文件类型')
    download_count = Column(Integer, default=0, comment='下载次数')
    is_vip = Column(String(1), default='0', comment='是否VIP专享')


